﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace NewsSpider.DBSqlHelp
{
    /// <summary>
    /// 数据库连接字符串类
    /// </summary>
    public class ConnectionData
    {
        public static string m_strSQLite;
        public static string m_strAccess;
        public static string m_strMSSQL;
        public static string m_strMySQL;
        public static string m_strOracle;

        /// <summary>
        /// 存储链接SQLite数据库连接字符串
        /// </summary>
        /// <param name="strValue">返回连接字符串</param>
        public static void SaveConnectionSQLiteString(string strValue)
        {
            m_strSQLite = strValue;
        }

        /// <summary>
        /// 获取链接SQLite数据库连接字符串
        /// </summary>
        /// <returns>返回连接字符串</returns>
        public static string GetConnectionSQLiteString()
        {
            return m_strSQLite;
        }

        /// <summary>
        /// 存储链接Access数据库连接字符串
        /// </summary>
        /// <param name="strValue">返回连接字符串</param>
        public static void SaveConnectionAccessString(string strValue)
        {
            m_strAccess = strValue;
        }

        /// <summary>
        /// 获取链接Access数据库连接字符串
        /// </summary>
        /// <returns>返回连接字符串</returns>
        public static string GetConnectionAccessString()
        {
            return m_strAccess;
        }


        /// <summary>
        /// 存储链接MSSQL数据库连接字符串
        /// </summary>
        /// <param name="strValue">返回连接字符串</param>
        public static void SaveConnectionMSSQLString(string strValue)
        {
            m_strMSSQL = strValue;
        }

        /// <summary>
        /// 获取链接MSSQL数据库连接字符串
        /// </summary>
        /// <returns>返回连接字符串</returns>
        public static string GetConnectionMSSQLString()
        {
            return m_strMSSQL;
        }


        /// <summary>
        /// 存储链接MySQL数据库连接字符串
        /// </summary>
        /// <param name="strValue">返回连接字符串</param>
        public static void SaveConnectionMySQLString(string strValue)
        {
            m_strMySQL = strValue;
        }

        /// <summary>
        /// 获取链接MySQL数据库连接字符串
        /// </summary>
        /// <returns>返回连接字符串</returns>
        public static string GetConnectionMySQLString()
        {
            return m_strMySQL;
        }

        /// <summary>
        /// 存储链接Oracle数据库连接字符串
        /// </summary>
        /// <param name="strValue">返回连接字符串</param>
        public static void SaveConnectionOracleString(string strValue)
        {
            m_strOracle = strValue;
        }

        /// <summary>
        /// 获取链接Oracle数据库连接字符串
        /// </summary>
        /// <returns>返回连接字符串</returns>
        public static string GetConnectionOracleString()
        {
            return m_strOracle;
        }
    }
}
